package com.kly.order.db.dao;

import com.fqgj.common.api.Page;
import com.fqgj.common.base.BaseMapper;
import com.kly.order.db.entity.UserVasPurchasesEntity;

import java.util.List;
import java.util.Map;

/**
 * User: 11437
 * Date: 2023-06-01
 * Time: 09:27:21.727
 */

public interface UserVasPurchasesDao extends BaseMapper<UserVasPurchasesEntity> {

    List<UserVasPurchasesEntity> selectByUserCode(Map<String, Object> params);

    List<UserVasPurchasesEntity> queryBenefits(Page page);

    int queryBenefitsTotal();

    List<UserVasPurchasesEntity> queryBenefitsByUserCode(String userCode);

    int updateUsageCount(int usageCount, String userCode, int benefitCode);

    /**
     * 用户权益发放
     */
    int updateAllUserBenefits();
    int updateFlashChatAndWlmBenefits();

}